home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cocktail
/
front.lha
/
front
/
src
/
Id.mi
< prev
next >
Wrap
Text File
|
1992-08-18
|
1KB
|
53 lines
MODULE @Drv;
FROM @ IMPORT BeginScanner, GetToken, EofToken, CloseScanner, ScanTabName;
FROM IO IMPORT CloseIO;
FROM System IMPORT GetArgCount, GetArgument, Exit;
FROM Strings IMPORT tString, AssignEmpty, Assign, Append, Concatenate,
ReadL, WriteL, ArrayToString, StringToArray;
VAR
Token : INTEGER;
Argument : ARRAY [0..255] OF CHAR;
Lib ,
String ,
PathS : tString;
i, j, n : SHORTCARD;
ch : CHAR;
BEGIN
AssignEmpty (Lib);
n := GetArgCount () - 1;
FOR i := 1 TO n DO
GetArgument (i, Argument);
IF Argument [0] = '-' THEN
IF Argument [1] = 'l' THEN
AssignEmpty (Lib);
j := 2;
LOOP
ch := Argument [j];
IF ch = 0C THEN EXIT; END;
Append (Lib, ch);
INC (j);
END;
Append (Lib, '/');
DEC (n);
END;
END;
END;
ArrayToString (ScanTabName, String); (* name of scanner table *)
Assign (PathS, Lib);
Concatenate (PathS, String);
Append (PathS, 0C);
StringToArray (PathS, ScanTabName);
BeginScanner;
REPEAT
Token := GetToken ();
UNTIL Token = EofToken;
CloseScanner;
CloseIO;
Exit (0);
END @Drv.